package com.le.edu.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.le.edu.domain.entity.User;
import com.le.edu.domain.screen.SexVO;
import com.le.edu.domain.vo.UserVO;
import com.le.edu.utils.ClientUtils;

/**
 * @author 17447
 * @description 针对表【t_user(会员表)】的数据库操作Service
 * @createDate 2023-12-27 19:22:43
 */
public interface UserService extends IService<User> {

    String login(String username, String password, ClientUtils.ClientEnum clientEnum);

    int resetPassword(User user);

    void checkUsernameUnique(String username);

    /**
     * 判断用户名是否唯一  查找不是本id的用户名
     *
     * @param userId
     * @param username
     */

    void checkUsernameUniqueNeUserId(Long userId, String username);

    Page<UserVO> pageUserList(Page<UserVO> page, LambdaQueryWrapper<User> wrapper);

    SexVO computeSexRatio();
}
